<template>
    <div class="edu-page-warp">
        <condition-card v-if="isGraduate" @reset="reset" @search="onSubmit" label-width="160px">
            <el-row :gutter="24">
                <el-col :span="8">
                    <el-form-item :label="$t('label.trainingLevel')">
                        <el-select v-model="queryForm.trainingLevel" style="width: 100%;">
                            <el-option
                                v-for="item in options.trainingLevel"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value"
                            ></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="培养类别">
                        <el-select v-model="queryForm.trainingCategory" style="width: 100%;">
                            <el-option
                                v-for="item in options.trainingCategory"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value"
                            ></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="专业学位类别">
                        <el-select v-model="queryForm.majorId" style="width: 100%;">
                            <el-option
                                v-for="item in options.majorId"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value"
                            ></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row :gutter="24">
                <el-col :span="8">
                    <el-form-item :label="$t('label.college')">
                        <el-select v-model="queryForm.college" style="width: 100%;">
                            <el-option
                                v-for="item in options.college"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value"
                            ></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="是否招生">
                        <el-select v-model="queryForm.isRecruit" style="width: 100%;">
                            <el-option
                                v-for="item in options.isRecruit"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value"
                            ></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
            </el-row>
        </condition-card>
        <el-card shadow="never">
            <div class="edu-page-title">研究生专业学位专业</div>
            <div class="edu-opertion-bar" v-if="isGraduate">
                <div class="float-left">
                    <el-input
                        v-model="queryForm.condition"
                        placeholder="输入专业名称或代码搜索"
                        style="width:200px"
                        @keyup.enter.native="onSubmit"
                    >
                        <i
                            class="el-icon-search"
                            slot="suffix"
                            style="margin-top:10px;cursor:pointer"
                            @click="onSubmit"
                        ></i>
                    </el-input>
                </div>
                <div class="float-right">
                    <el-button type="primary" @click="showAddDialog">{{$t("message.add")}}</el-button>
                    <el-button @click="exportMajor">{{$t('message.export')}}</el-button>
                </div>
            </div>
            <el-table stripe :data="viewData" size="mini" width="100%">
                <el-table-column label="专业学位类别">
                    <template slot-scope="props">
                        <span :title="props.row.majorName">{{props.row.majorName}}</span>
                    </template>
                </el-table-column>
                <el-table-column label="专业代码">
                    <template slot-scope="props">
                        <span :title="props.row.code">{{props.row.code}}</span>
                    </template>
                </el-table-column>
                <el-table-column label="领域名称">
                    <template slot-scope="props">
                        <span :title="props.row.name">{{props.row.name}}</span>
                    </template>
                </el-table-column>
                <el-table-column prop="time" label="授权年份"></el-table-column>
                <el-table-column label="是否博士点">
                    <template slot-scope="props">{{getTextByValue(props.row.isDoctor)}}</template>
                </el-table-column>
                <el-table-column :label="$t('message.operating')" width="100">
                    <template slot-scope="scope">
                        <el-button
                            type="text"
                            size="mini"
                            @click="edit(scope.row)"
                        >{{$t("message.edit")}}</el-button>
                        <el-button
                            type="text"
                            size="mini"
                            @click="deleteMajor(scope.row)"
                        >{{$t("message.delete")}}</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <el-row>
                <el-col>
                    <el-pagination
                        @size-change="handleSizeChange"
                        @current-change="handleCurrentChange"
                        :current-page="queryForm.pageNum_"
                        :page-sizes="[20, 40, 80, 100]"
                        :page-size="queryForm.pageSize_"
                        layout="total, sizes, prev, pager, next, jumper"
                        :total="queryForm.total_"
                        style="float:right;margin-top:10px"
                    ></el-pagination>
                </el-col>
            </el-row>
        </el-card>
        <el-dialog
            title="研究生学科目录、专业目录(专业学位)"
            width="800px"
            :visible.sync="showDialog"
            @close="resetFormValidate()"
            :close-on-click-modal="false"
        >
            <el-form
                :model="postForm"
                label-position="left"
                label-width="160px"
                :rules="rules"
                ref="postForm"
            >
                <el-row gutter="20">
                    <el-col :span="12">
                        <el-form-item label="专业学位名称" prop="majorId">
                            <el-select v-model="postForm.majorId" style="width: 100%;">
                                <el-option
                                    v-for="item in options.majorId"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value"
                                ></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="领域名称" prop="name">
                            <el-input v-model="postForm.name" maxlength="50"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row gutter="20">
                    <el-col :span="12">
                        <el-form-item label="专业代码" prop="code">
                            <el-input v-model="postForm.code" maxlength="50"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="授权年份">
                            <el-date-picker
                                ref="datepicker"
                                v-model="postForm.time"
                                type="year"
                                value-format="yyyy"
                                style="width:100%"
                            ></el-date-picker>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row gutter="20">
                    <el-col :span="12">
                        <el-form-item label="英文名称">
                            <el-input v-model="postForm.nameEn" maxlength="50"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="是否有效">
                            <el-select v-model="postForm.status" style="width: 100%;">
                                <el-option
                                    v-for="item in options.status"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value"
                                ></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row gutter="20">
                    <el-col :span="12">
                        <el-form-item label="是否撤销">
                            <el-select v-model="postForm.isRevoke" style="width: 100%;">
                                <el-option
                                    v-for="item in options.isRevoke"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value"
                                ></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="撤销时间">
                            <el-date-picker
                                :disabled="revokeTimeReadOnly"
                                v-model="postForm.revokeTime"
                                value-format="yyyy-MM-dd HH:mm:ss"
                                type="month"
                                style="width:100%"
                            ></el-date-picker>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row gutter="20">
                    <el-col :span="12">
                        <el-form-item label="是否博士点">
                            <el-select v-model="postForm.isDoctor" style="width: 100%;">
                                <el-option
                                    v-for="item in options.isDoctor"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value"
                                ></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="是否招生">
                            <el-select v-model="postForm.isRecruit" style="width: 100%;">
                                <el-option
                                    v-for="item in options.isRecruit"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value"
                                ></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row gutter="20" v-if="editId">
                    <el-col :span="12">招生/培养信息</el-col>
                    <el-col :span="12">
                        <div class="float-right">
                            <el-button
                                type="primary"
                                @click="openCollegeDialog"
                            >{{$t("message.add")}}</el-button>
                        </div>
                    </el-col>
                </el-row>
                <el-row gutter="20" v-if="editId" style="margin-bottom:10px">
                    <el-col>
                        <el-table stripe :data="collegeRelation" size="mini" width="100%">
                            <el-table-column
                                prop="trainingLevelI18n"
                                :label="$t('label.trainingLevel')"
                                width="120px"
                            ></el-table-column>
                            <el-table-column label="培养类别" width="120px">
                                <template slot-scope="scope">
                                    <span
                                        :title="scope.row.trainingCategoryI18n"
                                    >{{scope.row.trainingCategoryI18n}}</span>
                                </template>
                            </el-table-column>
                            <el-table-column prop="studentCategoryI18n" label="学位类别" width="120px"></el-table-column>
                            <el-table-column label="所属院系">
                                <template slot-scope="scope">{{scope.row.collegesI18n}}</template>
                            </el-table-column>
                            <el-table-column :label="$t('message.operating')" width="100">
                                <template slot-scope="scope">
                                    <el-button
                                        type="text"
                                        size="mini"
                                        @click="editCollege(scope.row)"
                                    >{{$t("message.edit")}}</el-button>
                                    <el-button
                                        type="text"
                                        size="mini"
                                        @click="deleteCollege(scope.row)"
                                    >{{$t("message.delete")}}</el-button>
                                </template>
                            </el-table-column>
                        </el-table>
                    </el-col>
                </el-row>
                <el-row gutter="20">
                    <el-col :span="24">
                        <div class="float-right">
                            <el-button @click="cancel">{{$t("message.cancel")}}</el-button>
                            <el-button type="primary" @click="save">{{$t("message.save")}}</el-button>
                        </div>
                    </el-col>
                </el-row>
            </el-form>
        </el-dialog>
        <el-dialog
            title="学生类别院系维护"
            width="800px"
            :visible.sync="showCollegeDialog"
            :close-on-click-modal="false"
            @close="resetCollegeFormValidate()"
        >
            <el-form
                :model="postCollegeForm"
                label-position="left"
                label-width="100px"
                ref="postCollegeForm"
                :rules="collegeRules"
            >
                <el-row gutter="20">
                    <el-col :span="12">
                        <el-form-item :label="$t('label.trainingLevel')" prop="trainingLevel">
                            <el-select v-model="postCollegeForm.trainingLevel" style="width: 100%;">
                                <el-option
                                    v-for="item in options.trainingLevel"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value"
                                ></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="培养类别" prop="trainingCategory">
                            <el-select
                                v-model="postCollegeForm.trainingCategory"
                                multiple
                                style="width: 100%;"
                            >
                                <el-option
                                    v-for="item in options.trainingCategory"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value"
                                ></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row gutter="20">
                    <el-col :span="12">
                        <el-form-item label="学位类别">
                            <el-select
                                disabled
                                v-model="postCollegeForm.studentCategory"
                                style="width: 100%;"
                            >
                                <el-option
                                    v-for="item in options.studentCategory"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value"
                                ></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row gutter="20">
                    <el-col :span="24">
                        <el-checkbox-group v-model="chkColleges">
                            <el-table :data="colleges" ref="collegeTable">
                                <el-table-column label="所属院系信息：">
                                    <template slot-scope="props">
                                        <el-checkbox
                                            v-if="props.row.c0"
                                            :label="props.row.c0.value"
                                        >{{props.row.c0.label}}</el-checkbox>
                                    </template>
                                </el-table-column>
                                <el-table-column>
                                    <template slot-scope="props">
                                        <el-checkbox
                                            v-if="props.row.c1"
                                            :label="props.row.c1.value"
                                        >{{props.row.c1.label}}</el-checkbox>
                                    </template>
                                </el-table-column>
                                <el-table-column>
                                    <template slot-scope="props">
                                        <el-checkbox
                                            v-if="props.row.c2"
                                            :label="props.row.c2.value"
                                        >{{props.row.c2.label}}</el-checkbox>
                                    </template>
                                </el-table-column>
                                <el-table-column>
                                    <template slot-scope="props">
                                        <el-checkbox
                                            v-if="props.row.c3"
                                            :label="props.row.c3.value"
                                        >{{props.row.c3.label}}</el-checkbox>
                                    </template>
                                </el-table-column>
                            </el-table>
                        </el-checkbox-group>
                    </el-col>
                </el-row>
                <el-row gutter="20">
                    <el-col :span="24">
                        <div class="float-right">
                            <el-button @click="cancelCollege">{{$t("message.cancel")}}</el-button>
                            <el-button type="primary" @click="saveCollege">{{$t("message.save")}}</el-button>
                        </div>
                    </el-col>
                </el-row>
            </el-form>
        </el-dialog>
    </div>
</template>
<script>
import bus from "common/src/utils/bus";
import { queryDic } from "common/src/api/dictionary";
import UTILS from "common/src/utils/utils";
import {
    getAllMajorList,
    addGraduateDegree,
    getGraduateDegreePage,
    getGraduateDegreeById,
    deleteGraduateDegree,
    editGraduateDegree,
    addStudentCollege,
    getStudentCollegeList,
    getStudentCollegeById,
    deleteStudentCollegeById,
    editStudentCollegeById,
    exportDegree
} from "common/src/api/resource/course";
export default {
    name: "graduateProfessionMajor",
    data() {
        return {
            queryForm: {
                trainingLevel: "",
                trainingCategory: "",
                majorId: "",
                college: "",
                isRecruit: "",
                condition: "",
                pageNum_: 1,
                pageSize_: 20,
                total_: 0,
                type: 2
            },
            postForm: {
                majorId: "",
                name: "",
                nameEn: "",
                code: "",
                time: "",
                status: "1",
                isDoctor: "0",
                isRevoke: "0",
                isRecruit: "1",
                revokeTime: "",
                type: 2 //必填
            },
            postCollegeForm: {
                trainingLevel: "",
                trainingCategory: "",
                studentCategory: "2"
            },
            options: {
                trainingLevel: [],
                college: [],
                allTrainingLevel: [],
                trainingCategory: [],
                studentCategory: [],
                majorId: [],
                status: [],
                isRecruit: [],
                isRevoke: [],
                isDoctor: []
            },
            rules: {
                majorId: [
                    {
                        required: true,
                        message: "请选择专业学位名称",
                        trigger: "blur"
                    }
                ],
                code: [
                    {
                        required: true,
                        message: "请填写专业代码",
                        trigger: "blur"
                    }
                ],
                name: [
                    {
                        required: true,
                        message: "请填写领域名称",
                        trigger: "blur"
                    }
                ]
            },
            collegeRules: {
                trainingLevel: [
                    {
                        required: true,
                        message: "请选择培养层次",
                        trigger: "blur"
                    }
                ],
                trainingCategory: [
                    {
                        required: true,
                        message: "请选择培养类别",
                        trigger: "blur"
                    }
                ]
            },
            viewData: [],
            showDialog: false,
            showCollegeDialog: false,
            editId: "",
            editCollegeId: "",
            colleges: [], //院系列表
            chkColleges: [], //院系复选框列表
            collegeRelation: [],
            isGraduate: false
        };
    },
    mounted: function() {
        let user =
            this.$store.state.session.user ||
            JSON.parse(localStorage.getItem("user"));
        if (user && user.currentManageDptId) {
            this.isGraduate = user.currentManageDptId != "1";
        }
        this.init();
    },
    watch: {
        postForm: {
            handler(curVal, oldVal) {
                if ("0" == curVal.isRevoke) {
                    this.revokeTimeReadOnly = true;
                    this.postForm.revokeTime = "";
                } else if ("1" == curVal.isRevoke) {
                    this.revokeTimeReadOnly = false;
                }
            },
            deep: true
        }
    },
    methods: {
        init() {
            let yes = { label: this.$t("message.yes"), value: "1" };
            let no = { label: this.$t("message.no"), value: "0" };
            this.options.status.push(yes);
            this.options.status.push(no);
            this.options.isDoctor.push(yes);
            this.options.isRecruit.push(yes);
            this.options.isRecruit.push(no);
            this.options.isRevoke.push(yes);
            this.options.isRevoke.push(no);
            this.options.isDoctor.push(no);
            let data = {
                lang: this.$store.getters.language || "cn",
                type: "allChild",
                keys: ["X_PYCC", "X_YX", "X_PYLB", "X_XWLB"]
            };
            queryDic(data).then(res => {
                if (res.code == 200) {
                    UTILS.fillSelect(
                        {
                            allTrainingLevel: "X_PYCC",
                            college: "X_YX",
                            trainingCategory: "X_PYLB",
                            studentCategory: "X_XWLB"
                        },
                        res.data,
                        this.options
                    );
                }
            });
            getAllMajorList({
                level: 1,
                type: 2,
                page: false
            }).then(res => {
                if (res.code == 200) {
                    this.options.majorId = res.data.list.map(c => {
                        return {
                            label: c.name,
                            value: c.id
                        };
                    });
                }
            });
            this.onSubmit();
        },
        initCollege() {
            if (this.options.college.length == 0) {
                return;
            }
            let colleges = [];
            let cols = 4;
            let rows = 0;
            let len = this.options.college.length;
            if (len % cols == 0) {
                rows = len / cols;
            } else {
                rows = Math.floor(len / cols) + 1;
            }
            for (let i = 0; i < rows; i++) {
                colleges.push({
                    c0: null,
                    c1: null,
                    c2: null,
                    c3: null
                });
            }
            this.options.college.forEach((c, index) => {
                colleges[Math.floor(index / cols)]["c" + (index % cols)] = c;
            });
            this.colleges = colleges;
        },
        onSubmit() {
            if (this.isGraduate) {
                this.getDataList();
            } else {
                this.viewData = [];
                this.queryForm.total_ = 0;
            }
        },
        reset() {
            this.queryForm.trainingLevel = "";
            this.queryForm.trainingCategory = "";
            this.queryForm.majorId = "";
            this.queryForm.college = "";
            this.queryForm.isRecruit = "";
            this.queryForm.condition = "";
        },
        getDataList(isFirstPage = true) {
            if (isFirstPage) {
                this.queryForm.pageNum_ = 1;
            }
            getGraduateDegreePage(this.queryForm).then(res => {
                if (res.code == 200) {
                    this.viewData = res.data.list;
                    this.queryForm.total_ = res.data.total_;
                }
            });
        },
        handleSizeChange(val) {
            this.queryForm.pageSize_ = val;
            this.getDataList();
        },
        handleCurrentChange(val) {
            this.queryForm.pageNum_ = val;
            this.getDataList(false);
        },
        edit(row) {
            this.editId = row.id;
            getGraduateDegreeById(row.id)
                .then(res => {
                    if (res.code == 200) {
                        Object.keys(res.data).forEach(k => {
                            if (this.postForm.hasOwnProperty(k)) {
                                this.postForm[k] =
                                    res.data[k] == 0 || res.data[k] == 1
                                        ? res.data[k].toString()
                                        : res.data[k];
                            }
                        });
                        if (res.data.time) {
                            let date = new Date();
                            date.setFullYear(res.data.time);
                            this.postForm.time = date;
                        }
                        this.showDialog = true;
                        return res.data.majorId;
                    }
                })
                .then(() => {
                    this.getStudentCollegeList();
                });
        },
        deleteMajor(row) {
            this.$confirm(
                this.$t("message.deleteConfirm"),
                this.$t("message.prompt"),
                {
                    confirmButtonText: this.$t("message.confirm"),
                    cancelButtonText: this.$t("message.cancel"),
                    type: "warning"
                }
            ).then(() => {
                deleteGraduateDegree({ ids: [row.id] }).then(res => {
                    if (res.code == 200) {
                        this.$message({
                            type: "success",
                            message: this.$t("message.deleteSuccess")
                        });
                        this.getDataList();
                    }
                });
            });
        },
        save() {
            this.$refs.postForm.validate(valid => {
                if (!valid) {
                    return;
                }
                let fn = res => {
                    if (res.code == 200) {
                        this.$message({
                            type: "success",
                            message: this.$t("message.saveSuccess")
                        });
                        this.onSubmit();
                        this.showDialog = false;
                    }
                };

                if (this.editId) {
                    let data = _.cloneDeep(this.postForm);
                    data.time = this.$refs.datepicker.displayValue;
                    data.id = this.editId;
                    editGraduateDegree(data).then(fn);
                } else {
                    addGraduateDegree(this.postForm).then(fn);
                }
            });
        },
        cancel() {
            this.showDialog = false;
        },
        showAddDialog() {
            this.showDialog = true;
        },
        resetFormValidate() {
            this.$refs.postForm.clearValidate();
            this.postForm.majorId = "";
            this.postForm.name = "";
            this.postForm.nameEn = "";
            this.postForm.time = "";
            this.postForm.code = "";
            this.postForm.isDoctor = "0";
            this.postForm.status = "1";
            this.editId = "";
            this.collegeRelation.length = 0;
        },
        getTextByValue(val) {
            return val ? this.$t("message.yes") : this.$t("message.no");
        },
        openCollegeDialog() {
            this.showCollegeDialog = true;
            this.initCollege();
        },
        saveCollege() {
            this.$refs.postCollegeForm.validate(valid => {
                if (!valid) {
                    return;
                }
                if (this.chkColleges.length == 0) {
                    this.$message({
                        type: "warning",
                        message: "请选择所属院系"
                    });
                    return;
                }
                let data = _.cloneDeep(this.postCollegeForm);
                if (this.postCollegeForm.trainingCategory.length > 0)
                    data.trainingCategory =
                        this.postCollegeForm.trainingCategory.join(",") + ",";
                data.degreeId = this.editId;
                data.colleges =
                    this.chkColleges.length > 0
                        ? this.chkColleges.join(",") + ","
                        : "";
                let fn = res => {
                    if (res.code == 200) {
                        this.showCollegeDialog = false;
                        this.$message({
                            type: "success",
                            message: this.$t("message.saveSuccess")
                        });
                        this.getStudentCollegeList();
                    }
                };
                if (this.editCollegeId) {
                    data.id = this.editCollegeId;
                    editStudentCollegeById(data).then(fn);
                } else {
                    addStudentCollege(data).then(fn);
                }
            });
        },
        cancelCollege() {
            this.showCollegeDialog = false;
        },
        resetCollegeFormValidate() {
            this.postCollegeForm.trainingLevel = "";
            this.postCollegeForm.trainingCategory = [];
            this.postCollegeForm.studentCategory = "2";
            this.chkColleges.length = 0;
            this.colleges = [];
            this.editCollegeId = "";
            this.$refs.postCollegeForm.clearValidate();
        },
        getStudentCollegeList() {
            getStudentCollegeList({ degreeId: this.editId }).then(res => {
                if (res.code == 200) {
                    this.collegeRelation = res.data.list;
                }
            });
        },
        //编辑院系
        editCollege(row) {
            this.editCollegeId = row.id;
            getStudentCollegeById(this.editCollegeId).then(res => {
                if (res.code == 200) {
                    this.showCollegeDialog = true;
                    this.postCollegeForm.trainingLevel = res.data.trainingLevel;
                    if (res.data.trainingCategory) {
                        this.postCollegeForm.trainingCategory = res.data.trainingCategory
                            .substring(0, res.data.trainingCategory.length - 1)
                            .split(",");
                    }

                    this.postCollegeForm.studentCategory = "2";
                    if (res.data.colleges) {
                        this.chkColleges = res.data.colleges
                            .split(",")
                            .filter(c => c);
                    }
                    this.initCollege();
                }
            });
        },
        //删除院系
        deleteCollege(row) {
            this.$confirm(
                this.$t("message.deleteConfirm"),
                this.$t("message.prompt"),
                {
                    confirmButtonText: this.$t("message.confirm"),
                    cancelButtonText: this.$t("message.cancel"),
                    type: "warning"
                }
            ).then(() => {
                deleteStudentCollegeById({ ids: [row.id] }).then(res => {
                    if (res.code == 200) {
                        this.$message({
                            type: "success",
                            message: this.$t("message.deleteSuccess")
                        });
                        this.getStudentCollegeList();
                    }
                });
            });
        },
        exportMajor() {
            exportDegree(this.queryForm);
        }
    }
};
</script>
<style lang="scss" scoped>
</style>
